package simonxianyu.learn.springmybatis.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import simonxianyu.learn.springmybatis.db.dbsvc.SysUserDbSvc;
import simonxianyu.learn.springmybatis.db.po.SysUser;

/**
 *
 * Created by simon on 2017/2/20.
 */
@Controller
@RequestMapping("/sysuser")
public class SysUserCtl {
  @Autowired
  private SysUserDbSvc dbSvc;

  @RequestMapping("/get/{id}")
  @ResponseBody
  public SysUser get(@PathVariable("id") String id) {
    return dbSvc.getById(id);
  }
}
